home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / boot / tlpatch204.lha / tlpatch / ReadMe < prev    next >
Encoding:
Text File  |  1994-12-25  |  10.4 KB  |  245 lines

  1.  
  2.                          ***************************
  3.                         **      TLPatch V1.0       **
  4.                        *** Richard Sheppard - 1991 ***
  5.                         **    Toronto, Canada      ** 
  6.                          ***************************
  7.  
  8.           A utility to allow corrections in pronunciation for programs
  9.        that use the Translate() function. It is offered as "freeware"
  10.        without support (or liability) in return for my years of pleasure
  11.        with the Amiga. I hope it can be useful.
  12.  
  13.  
  14. *****************************************************************************
  15.  
  16.  
  17.                      **************************************
  18.                     **             TLPatch204             **
  19.                    ***      Kenneth Jennings - 1994       ***
  20.                    ***           Miami, Florida           *** 
  21.                     ** Internet: kenneth@daffy.aatech.com **
  22.                      **************************************
  23.  
  24.           The patch utility, itself patched, to handle the last library
  25.        released (37.1) by Commodore with WB 2.04.  It works on my Amiga
  26.        and does no real goofy tricks to the system, so there's no reason
  27.        why it shouldn't run on yours.  Support is as follows: If it
  28.        blows up your system causing you to reformat all your hard drives
  29.        merely drop me a note via Email on the internet and I will send
  30.        respond with mail saying I'm very sorry for what happened.
  31.  
  32.        These programs you are about to run are real programs, the names
  33.        have been changed to protect the innocent.  Where applicable use
  34.        TLPatch204 and Translate204 in place of TLPatch and Translate, 
  35.        respectively.
  36.  
  37.        The TLPatch V1.0 source was (I assume) written for some version 
  38.        of the old Lattice C compiler.  The new TLPatch204 source was 
  39.        tweaked to compile properly and without warnings for the SAS/C 
  40.        6.51 compiler.  If the makefile looks stupid I just have to say
  41.        that I did this without the SAS/C manuals, since I left them at 
  42.        work which is a pretty idiotic place to keep them considering I 
  43.        don't use an Amiga at work. (YET!)
  44.  
  45.        I cleaned up the source (white space, hex values) in ways that 
  46.        are meaningful to me.  If you don't like the way it looks, well, 
  47.        too bad.  Phhhttttppp!  I'm the one that fixed it.  I also put in
  48.        a bunch of debugging stuff, so you can see what the code is pro-
  49.        cessing (if you really care) if you recompile with the DEBUG_ON
  50.        flag #defined.  The debugging output is written to the file 
  51.        tl.debug in RAM:.
  52.  
  53.        The only real major deviation between the logic in the two
  54.        versions of TLPatch is that the original version mysteriously 
  55.        adds 2 to the size of the exception table when deciding if the 
  56.        table ends at WORD alignment.  In reality, it's trying to align
  57.        the end of the table to LONGs.  Fortunately, the logic worked for
  58.        the WB 1.3 Rel. 33.2 translator.library.  It doesn't work for the
  59.        new WB 2.04 Rel. 37.1 translator.library, so I fixed it. The size
  60.        and data for the reloc32 hunk at the end of the file is also
  61.        different.
  62.  
  63.  
  64. *****************************************************************************
  65.  
  66.  
  67.           One of the unique features of the Amiga is its ability to 
  68.        translate english text into spoken audio. This is a two-stage 
  69.        process involving the Translate() function which converts the 
  70.        text into phonemes, and the Narrator device which uses the 
  71.        phonemes to synthesize the voice.
  72.  
  73.           Unfortunately, this feature appears to be underutilized, due
  74.        perhaps to the many words which do not translate accurately.
  75.        This program allows you to extract the exception table from the 
  76.        translator.library, and using a text editor, edit the table 
  77.        then restore it back into the library. It is meant to work 
  78.        primarily with version 33.2 of the library and will warn if it 
  79.        finds another one although that may or may not be fatal. It is 
  80.        definitely a hack, so it could really scramble the code, but 
  81.        since it creates the new library in ram: you'll have a chance to
  82.        try it before replacing your working library. Programs that use 
  83.        the Translate() function such as SpeechToy and the SPEAK: device 
  84.        will receive a harmless error message from Translate() if the 
  85.        library is corrupt. 
  86.  
  87.        USAGE:
  88.                   assign LIBS: RAM:
  89.                   TLPatch [-x]
  90.  
  91.           Where "-x" is used to extract the existing exception table
  92.        from LIBS:translator.library and write it to ram:except.tbl
  93.        adding linefeeds between the exceptions. This can be used if you
  94.        wish to start with the original exception table or if you lose
  95.        your working copy of except.tbl. Without the "-x" option, TLPatch
  96.        will read except.tbl, which it expects to find in ram:, and create
  97.        a new translator.library in ram:.
  98.  
  99.           The assignment command is necessary when you first begin the
  100.        session if you wish to try the new library, otherwise speech 
  101.        programs will continue to use the library they found in LIBS: on
  102.        disk. Subsequent invocations of TLPatch will free the library
  103.        pointer so that your latest edited library is the valid one.
  104.  
  105.                                  EXCEPTIONS
  106.  
  107.           An exception consists of text on the left of an '=' sign and 
  108.        the resultant phonemes on the right. The text contains the actual
  109.        characters to be converted which are surrounded by square 
  110.        brackets [], plus any leading or trailing characters whose context
  111.        might effect the sound, and possibly substitution symbols which 
  112.        can match a variety of input strings. Upper-case is used for the
  113.        input text and phonemes.
  114.  
  115.           For example:
  116.  
  117.         [AGO] =AHGOW2\
  118.  
  119.           Here all the input characters are translated and because the
  120.        input text has a space before and after it, only the word "ago"
  121.        will match this exception. If there were no spaces, "lagoon" would
  122.        also match, since it contains "ago", which is not desired. This
  123.        might be termed a "specific exception" as it fits a specific word.
  124.  
  125.           Numbers such as the '2' in the example above can be added in the
  126.        phonetic string to add emphasis to vowels and dipthongs (not
  127.        consonants). Values from 1 to 5 are common.
  128.  
  129.        [A]SION=EY3\
  130.  
  131.           There is no leading space so this is a general exception which
  132.        will match all words ending "asion". Note that only the "a" part
  133.        is translated, the remainder being handled elsewhere.
  134.  
  135.        #:[EA] =IYAH\
  136.  
  137.           These are the tricky ones, being sort of "rule-based" they
  138.        match in cases where ANY vowel, consonant, etc. can occupy the
  139.        position of its substitution symbol in the input text. They are
  140.        tricky because if you create one, there may be words which you
  141.        hadn't considered which match. You might also defeat words which
  142.        had been correctly translated by creating an unforseen match.
  143.           In the example above "idea", "area" or "panacea" all fit.
  144.  
  145.           The advantage of rule-based exceptions is that they keep
  146.        the size of the library down by handling so many words.
  147.  
  148.           There are eight substitution symbols that I am aware of,
  149.        they are ? ^ % + # : & and @. After studying the library and
  150.        experimenting I believe they represent the following values:
  151.  
  152.        ? = numbers     (0,1,2,3,4,5,6,7,8,9)
  153.  
  154.            e.g. ?[X]?= BAY`    - as in "2x4" (the 'X' becomes "by")
  155.  
  156.        ^ = consonants  (c,f,h,k,p,q,s,x)
  157.  
  158.            e.g. ^[AS]#=EYS\    - as in "CASE"
  159.  
  160.        % = vowels      (e)
  161.  
  162.            e.g. [NGL]%=NXGUL\  - as in "ANGLE"
  163.  
  164.        + = vowels      (e,i,y)
  165.  
  166.            e.g. [G]+=J\        - as in "AGE"
  167.  
  168.        # = vowels      (a,e,i,o,u,y)
  169.  
  170.            e.g. [BUS]#=BIH3Z\  - as in "BUSY"
  171.  
  172.        : = anything except a,e,i,o,u,y including NULL or SPACE
  173.  
  174.        & = consonants  (c,g,j,s,x,z)
  175.  
  176.            e.g. &[T]EN=\       - as in "LISTEN" (the 'T' is silent)
  177.  
  178.        @ = consonants  (d,j,l,n,r,s,t,z)
  179.  
  180.            e.g. @[EW]=UW\      - as in "CREW","DEW" or "NEW"
  181.  
  182.           Exceptions always end with either a "\" or "`", I have not
  183.       determined what difference it makes although the "\" is by far
  184.       the most common.
  185.  
  186.           I've included a simple program called "Translate" to access
  187.       the Translate() function. Usage from the CLI is:
  188.  
  189.                   Translate <text>
  190.  
  191.           <text> is your input text and can be one word as in:
  192.  
  193.                   Translate hello
  194.  
  195.           or a sentence in quotes as in:
  196.  
  197.                   Translate "hello world"
  198.  
  199.           Also included is my latest translator.library and exception
  200.       table, containing nearly 800 exceptions. Most notably corrections
  201.       to numbers as well as month abbreviations (Jan. Feb. etc.). A date
  202.       such as "1984" will read "nineteen eighty four" not "one nine eight
  203.       four". A number like "27,543" is pronounced "twenty seven thousand
  204.       five hundred and forty three" (the comma is important).
  205.  
  206.  
  207.  
  208.                               TABLE OF PHONEMES
  209.                                  (from RKM)
  210.  
  211.           Vowels -
  212.  
  213.              IY        beet   |  IH        bit    |  EH        bet
  214.              AE        bat    |  AA        hot    |  AH        under
  215.              AO        talk   |  UH        look   |  ER        bird
  216.              OH        border |  AX        about  |  IX        solid
  217.  
  218.           Dipthongs -
  219.  
  220.              EY        made   |  AY        hide   |  OY        boil
  221.              AW        power  |  OW        low    |  UW        crew
  222.  
  223.           Consonants -
  224.  
  225.              R         red    |  L         yellow |  W         away
  226.              Y         yellow |  M         men    |  N         men
  227.              NX        sing   |  SH        rush   |  S         sail
  228.              TH        thin   |  F         fed    |  ZH        pleasure
  229.              Z         has    |  DH        then   |  V         very
  230.              J         judge  |  CH        check  |  /C        loch
  231.              /H        hole   |  P         put    |  B         but
  232.              T         toy    |  D         dog    |  G         guest
  233.              K         could
  234.  
  235.           Special symbols -
  236.  
  237.              DX        pity   |  Q         kitten |  QX        pause
  238.              RX        car    |  LX        call
  239.  
  240.           Contractions -
  241.  
  242.              UL    =   AXL    |  IL    =   IXL    |  UM    =   AXM
  243.              IM    =   IXM    |  UN    =   AXN    |  IN    =   IXN
  244.  
  245.